public class ChargeableItem extends Object implements XMLMarshallable
Java class represents a chargeable item that is sent by your client
applications or systems (mediation) and to be charged by the connected SAP CC Core Server system;
This chargeable item represents data related to the usage (consumption) of a customer service.
The service consumption relates to an end customer of the service provider; he want to use,
is using, or has used the marketable service.
A chargeable item includes a set of custom properties sent by your client application.
SAP Convergent Charging uses these properties to rate (dynamic pricing) and charge the usage.
You can define some properties to be transmitted by SAP CC to the upstream systems like
a billing system.
See AsyncBatchServiceClient.acquire(..) for direct batch acquisition (asynchronous communications)
See BatchServiceClient.acquire(..) for direct batch acquisition (synchronous communications)
PropertyThe XML APIs specify the following XSD fragment:
| Constructor and Description |
|---|
ChargeableItem()
Constructs an empty chargeable item.
|
ChargeableItem(String name)
Constructs a chargeable item with an action name.
|
ChargeableItem(String name,
Vector<Property> properties)
Constructs a completly defined chargeable item.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
addProperty(Property property)
Adds a new
property to this chargeable item. |
ChargeableItem |
duplicate()
Returns a new clone instance of this chargeable item.
|
String |
getName()
Returns the name of the chargeable item.
|
Vector<Property> |
getProperties()
Returns the vector of the item properties.
|
List<Property> |
getPropertiesAsList()
Returns the list of the item properties.
|
Property |
getProperty(String propertyName)
Returns the
property which name
is propertyName. |
UniqueIdentifier |
getUniqueIdentifier()
Returns the unique identifier of the chargeable item.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
marshal(XMLOutputter output,
String tagName) |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setName(String name)
Sets the name of this chargeable item.
|
void |
setUniqueIdentifier(UniqueIdentifier uid)
Sets the unique identifier of the chargeable item.
|
public ChargeableItem()
public ChargeableItem(String name)
name - The name of the chargeable itempublic void setName(String name)
name - The name of the chargeable itempublic String getName()
public void setUniqueIdentifier(UniqueIdentifier uid)
uid - The unique identifier of the chargeable itempublic UniqueIdentifier getUniqueIdentifier()
public void addProperty(Property property)
property to this chargeable item.property - The added propertypublic Vector<Property> getProperties()
propertiespublic List<Property> getPropertiesAsList()
propertiespublic Property getProperty(String propertyName)
property which name
is propertyName.propertyName - The name of the requested propertyproperty, or null
if no such property exists in this chargeable item.public ChargeableItem duplicate()
public void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic void marshal(XMLOutputter output, String tagName)